package com.sphd.beautysalon.utils;

import android.os.CountDownTimer;

/**
 * Created by Hu on 2016/10/28.
 */

public class TimeCount extends CountDownTimer {
    TimeCountListener countListener;

    public TimeCount(long millisInFuture, long countDownInterval, TimeCountListener countListener) {
        super(millisInFuture, countDownInterval);
        this.countListener = countListener;
    }

    @Override
    public void onTick(long l) {
        countListener.onTicek(l);
    }

    @Override
    public void onFinish() {
        countListener.onFinish();
    }

    public interface TimeCountListener{
        void onTicek(long ls);
        void onFinish();
    }
}
